//
//  HZ_Listenin_CollectionViewCell.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/4/1.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HZ_Listenin_CollectionViewCell.h"
#import "UIImageView+WebCache.h"
@interface HZ_Listenin_CollectionViewCell ()


@property (nonatomic, strong) UILabel *sortlabel;
@property (nonatomic, strong) UILabel *Musicnamelabel;
@property (nonatomic, strong) UILabel *namellabel;
@property (nonatomic, strong) UILabel *lovelabel;
@property (nonatomic, strong) UILabel *qualitylabel;
@property (nonatomic, strong) UIImageView *Pictureimage;
@property (nonatomic, strong) UIImageView *loveimage;
@property (nonatomic, strong) UIImageView *playimage;


@end
@implementation HZ_Listenin_CollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    
    
    self = [super initWithFrame:frame];
    if (self) {
  
//        self.backgroundColor = [UIColor clearColor];
  
        self.Pictureimage = [[UIImageView alloc] initWithFrame:CGRectMake(10, self.bounds.size.height / 7, 4 * self.bounds.size.height / 6, 5 * self.bounds.size.height / 7)];
        
//        self.Pictureimage.backgroundColor = [UIColor orangeColor];
        
        [self.contentView addSubview:self.Pictureimage];
        
        self.Musicnamelabel = [[UILabel alloc] initWithFrame:CGRectMake(  self.Pictureimage.bounds.size.width + 15, self.Pictureimage.frame.origin.y,  4 * self.bounds.size.width / 8, self.Pictureimage.bounds.size.height / 2)];
        
        
        self.Musicnamelabel.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:self.Musicnamelabel];
        
        
       
        
        self.namellabel = [[UILabel alloc] initWithFrame:CGRectMake(self.Musicnamelabel.frame.origin.x, self.Pictureimage.frame.origin.y + self.Pictureimage.bounds.size.height / 2, 4 * self.bounds.size.width / 8, self.Pictureimage.bounds.size.height / 2)];
        
        
        self.namellabel.backgroundColor = [UIColor clearColor];
        self.namellabel.textColor = [UIColor colorWithRed:173 / 255.0 green:173 / 255.0 blue:173 / 255.0 alpha:1];
        self.namellabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:self.namellabel];
   
        self.playimage = [[UIImageView alloc] initWithFrame:CGRectMake(7 * self.bounds.size.width / 8, self.bounds.size.height / 2 - self.bounds.size.width / 16,  self.bounds.size.width / 14,  self.bounds.size.width / 14)];
        
        self.playimage.image = [UIImage imageNamed:@"iconfont-jiantou"];
//        self.playimage.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.playimage];
        

        
    }
    
    return self;
}

-(void)setModel:(HS_DataArray_Model *)model{
    
    _model = model;
    
    
    [self.Pictureimage sd_setImageWithURL:[NSURL URLWithString:_model.picUrl]];
  
    self.Musicnamelabel.text = _model.name;
    self.namellabel.text = _model.desc;
    
}
@end
